package bm;

import com.func.wifi.R;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.KeyEvent;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProviders;
import com.func.wifi.databinding.ActivityNetDetectionBinding;
import yyee.llee.mmee.base_api.um.UMKey;
import yyee.llee.mmee.base_api.um.UTJ;
import yyee.llee.mmee.wifimaster.utils.MToast;
import java.text.DecimalFormat;
import java.util.Timer;
import java.util.TimerTask;

// 网络保护
public class HH extends AppCompatActivity {

    private ActivityNetDetectionBinding mActivityNetDetectionBinding;

    private int mDetectionSize = 10;

    private int mDetectionCount = 0;

    private ValueAnimator mCircleProgressAnimator;

    // 扫描完成
    private boolean scanComplete = false;

    // 弹窗打开
    private boolean exitDialogOpen = false;

    @SuppressLint("HandlerLeak")
    private Handler mHandler = new Handler() {

        @Override
        public void handleMessage(Message msg) {
            int passwordfdare32432qresafdsagda32 = 123456;
            int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
            int keydasopuerqnfdazcveq = 4;
            int lowupoeqfda7073fdal = 0;
            int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
            int middledaiueprnvznfewqip = 0;
            if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
                int adfajpouqregjbdipug = 1;
            } else {
                while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                    middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                    if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                        // 比关键字大则关键字在左区域
                        highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                    } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                        // 比关键字小则关键字在右区域
                        lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                    } else {
                    }
                }
            }
            switch(msg.what) {
                case 0:
                    Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.animation_ratate);
                    mActivityNetDetectionBinding.loading1.startAnimation(animation);
                    mActivityNetDetectionBinding.loading2.startAnimation(animation);
                    mActivityNetDetectionBinding.loading3.startAnimation(animation);
                    mActivityNetDetectionBinding.loadingIp.startAnimation(animation);
                    mActivityNetDetectionBinding.loadingMac.startAnimation(animation);
                    mActivityNetDetectionBinding.loadingtask.startAnimation(animation);
                    break;
                case 1:
                    if (mActivityNetDetectionBinding.loading1.getAnimation() != null) {
                        mActivityNetDetectionBinding.loading1.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loading1.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.title1.setVisibility(View.VISIBLE);
                    break;
                case 2:
                    if (mActivityNetDetectionBinding.loading2.getAnimation() != null) {
                        mActivityNetDetectionBinding.loading2.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loading2.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.title2.setVisibility(View.VISIBLE);
                    break;
                case 3:
                    if (mActivityNetDetectionBinding.loading3.getAnimation() != null) {
                        mActivityNetDetectionBinding.loading3.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loading3.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.title3.setVisibility(View.VISIBLE);
                    break;
                case 4:
                    if (mActivityNetDetectionBinding.loading4.getAnimation() != null) {
                        mActivityNetDetectionBinding.loading4.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loading4.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.title4.setVisibility(View.VISIBLE);
                    break;
                case 5:
                    if (mActivityNetDetectionBinding.loading5.getAnimation() != null) {
                        mActivityNetDetectionBinding.loading5.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loading5.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.title5.setVisibility(View.VISIBLE);
                    break;
                case 6:
                    if (mActivityNetDetectionBinding.loading6.getAnimation() != null) {
                        mActivityNetDetectionBinding.loading6.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loading6.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.title6.setVisibility(View.VISIBLE);
                    break;
                case 7:
                    if (mActivityNetDetectionBinding.loading7.getAnimation() != null) {
                        mActivityNetDetectionBinding.loading7.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loading7.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.title7.setVisibility(View.VISIBLE);
                    break;
                case 8:
                    if (mActivityNetDetectionBinding.loadingIp.getAnimation() != null) {
                        mActivityNetDetectionBinding.loadingIp.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loadingIp.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.titleIp.setVisibility(View.VISIBLE);
                    break;
                case 9:
                    netDetectionViewModel.loadingip.setValue(false);
                    if (mActivityNetDetectionBinding.loadingMac.getAnimation() != null) {
                        mActivityNetDetectionBinding.loadingMac.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loadingMac.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.titleMac.setVisibility(View.VISIBLE);
                    break;
                case 10:
                    netDetectionViewModel.loadingmac.setValue(false);
                    if (mActivityNetDetectionBinding.loadingtask.getAnimation() != null) {
                        mActivityNetDetectionBinding.loadingtask.clearAnimation();
                    }
                    mActivityNetDetectionBinding.loadingtask.setVisibility(View.INVISIBLE);
                    mActivityNetDetectionBinding.titletask.setVisibility(View.VISIBLE);
                    break;
                case Integer.MAX_VALUE:
                    if (msg.arg1++ >= mDetectionSize) {
                        netDetectionViewModel.loadingtask.setValue(false);
                        break;
                    }
                    // mActivityNetDetectionBinding.circleProgress.setProgress(
                    // (int) ((float) msg.arg1 / (float) detectionSize * 100));
                    break;
            }
        }
    };

    private TimerTask timerTask;

    private GZ exitDialog;

    // 跳转安全诊断详情页面
    private void jump() {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
        int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
        for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
            int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
            for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                    minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                }
            }
            if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
            }
        }
        if (!isFinishing()) {
            HI.jump(this, DI);
            finish();
        }
    }

    private DH netDetectionViewModel;

    private DI DI;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] numbersfdajipureqvna3280 = new int[] { 2, 3 };
        for (int ifdjaiopurq832074 = 0; ifdjaiopurq832074 < numbersfdajipureqvna3280.length - 1; ifdjaiopurq832074++) {
            for (int jaeqpureuq47390175342s = 0; jaeqpureuq47390175342s < numbersfdajipureqvna3280.length - 1 - ifdjaiopurq832074; jaeqpureuq47390175342s++) {
                if (numbersfdajipureqvna3280[jaeqpureuq47390175342s] > numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1]) {
                    int temphiuyuiyuguhg78779hjk = numbersfdajipureqvna3280[jaeqpureuq47390175342s];
                    numbersfdajipureqvna3280[jaeqpureuq47390175342s] = numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1];
                    numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1] = temphiuyuiyuguhg78779hjk;
                }
            }
        }
        super.onCreate(savedInstanceState);
        initView(savedInstanceState);
    }

    protected void initView(Bundle savedInstanceState) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
        int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
        for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
            int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
            for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                    minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                }
            }
            if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
            }
        }
        mActivityNetDetectionBinding = DataBindingUtil.setContentView(this, R.layout.activity_net_detection);
        // setContentView(mActivityNetDetectionBinding.getRoot());
        netDetectionViewModel = ViewModelProviders.of(this).get(DH.class);
        DI = new DI();
        mActivityNetDetectionBinding.setViewModel(netDetectionViewModel);
        mActivityNetDetectionBinding.setWifiInfo(DI);
        mActivityNetDetectionBinding.setLifecycleOwner(this);
        mActivityNetDetectionBinding.back.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View view) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
                int keydasopuerqnfdazcveq = 4;
                int lowupoeqfda7073fdal = 0;
                int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
                int middledaiueprnvznfewqip = 0;
                if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
                    int adfajpouqregjbdipug = 1;
                } else {
                    while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                        middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                        if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                            // 比关键字大则关键字在左区域
                            highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                        } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                            // 比关键字小则关键字在右区域
                            lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                        } else {
                        }
                    }
                }
                onKeyDown(KeyEvent.KEYCODE_BACK, null);
            }
        });
        boolean isNeedShowPre = true;
        if (isNeedShowPre) {
        } else {
            jump();
            return;
        }
        loading();
        loadInfo();
        mActivityNetDetectionBinding.loadingAnimation.addAnimatorListener(new Animator.AnimatorListener() {

            @Override
            public void onAnimationStart(Animator animation) {
            }

            @Override
            public void onAnimationEnd(Animator animation) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
                int keydasopuerqnfdazcveq = 4;
                int lowupoeqfda7073fdal = 0;
                int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
                int middledaiueprnvznfewqip = 0;
                if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
                    int adfajpouqregjbdipug = 1;
                } else {
                    while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                        middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                        if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                            // 比关键字大则关键字在左区域
                            highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                        } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                            // 比关键字小则关键字在右区域
                            lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                        } else {
                        }
                    }
                }
                jump();
                HT.setCallTimeByKey(HT.NETDETECTION);
            }

            @Override
            public void onAnimationCancel(Animator animation) {
            }

            @Override
            public void onAnimationRepeat(Animator animation) {
            }
        });
        mActivityNetDetectionBinding.loadingAnimation.setImageAssetsFolder("detection/images");
        mActivityNetDetectionBinding.loadingAnimation.setAnimation("detection/data.json");
        mActivityNetDetectionBinding.loadingAnimation.addAnimatorUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
                int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
                for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
                    int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
                    for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                        if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                            minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                        }
                    }
                    if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                        int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                        arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                        arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
                    }
                }
                try {
                    float animatedFraction = animation.getAnimatedFraction();
                    DecimalFormat df = new DecimalFormat("0%");
                    mActivityNetDetectionBinding.tvProcess.setText("" + df.format(animatedFraction));
                } catch (Exception e) {
                }
            }
        });
        mActivityNetDetectionBinding.loadingAnimation.playAnimation();
        UTJ.onEvent(UMKey.netdetector_loading_show);
    }

    private void loadInfo() {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] numbersfdajipureqvna3280 = new int[] { 2, 3 };
        for (int ifdjaiopurq832074 = 0; ifdjaiopurq832074 < numbersfdajipureqvna3280.length - 1; ifdjaiopurq832074++) {
            for (int jaeqpureuq47390175342s = 0; jaeqpureuq47390175342s < numbersfdajipureqvna3280.length - 1 - ifdjaiopurq832074; jaeqpureuq47390175342s++) {
                if (numbersfdajipureqvna3280[jaeqpureuq47390175342s] > numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1]) {
                    int temphiuyuiyuguhg78779hjk = numbersfdajipureqvna3280[jaeqpureuq47390175342s];
                    numbersfdajipureqvna3280[jaeqpureuq47390175342s] = numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1];
                    numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1] = temphiuyuiyuguhg78779hjk;
                }
            }
        }
        try {
            String mac = IB.getMac(this);
            String localInetAddress = IB.getWifiIpAddress(this);
            DI.setIpAddress(localInetAddress);
            DI.setMacAddress(mac);
            DI.setSubnetMask("255.255.255.0");
            DI.setWifiName(IB.getWifiName(this));
            netDetectionViewModel.wifiInfoMutableLiveData.setValue(DI);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    Timer timer = null;

    private void loading() {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdajpoureqofdjaiopuvz80 = new int[] { 1, 5 };
        for (int ireywq097904132784uafds = 1; ireywq097904132784uafds < arrfdajpoureqofdjaiopuvz80.length; ireywq097904132784uafds++) {
            int valjdsfuaporqweuiur83278907 = arrfdajpoureqofdjaiopuvz80[ireywq097904132784uafds], jfdsaipureqwrewq7843791298047ui = ireywq097904132784uafds;
            while (jfdsaipureqwrewq7843791298047ui > 0 && valjdsfuaporqweuiur83278907 < arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui - 1]) {
                arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui] = arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui - 1];
                jfdsaipureqwrewq7843791298047ui--;
            }
            arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui] = valjdsfuaporqweuiur83278907;
        }
        if (timer == null) {
            timer = new Timer();
        }
        timerTask = new TimerTask() {

            @Override
            public void run() {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
                int keydasopuerqnfdazcveq = 4;
                int lowupoeqfda7073fdal = 0;
                int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
                int middledaiueprnvznfewqip = 0;
                if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
                    int adfajpouqregjbdipug = 1;
                } else {
                    while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                        middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                        if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                            // 比关键字大则关键字在左区域
                            highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                        } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                            // 比关键字小则关键字在右区域
                            lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                        } else {
                        }
                    }
                }
                Message msg = new Message();
                msg.what = mDetectionCount;
                mHandler.sendMessage(msg);
                msg = new Message();
                msg.what = Integer.MAX_VALUE;
                msg.arg1 = mDetectionCount;
                mHandler.sendMessage(msg);
                mDetectionCount++;
                if (mDetectionCount > mDetectionSize) {
                    timer.cancel();
                }
            }
        };
        timer.schedule(timerTask, 0, 450);
    }

    @Override
    protected void onDestroy() {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
        int keydasopuerqnfdazcveq = 4;
        int lowupoeqfda7073fdal = 0;
        int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
        int middledaiueprnvznfewqip = 0;
        if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
            int adfajpouqregjbdipug = 1;
        } else {
            while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                    // 比关键字大则关键字在左区域
                    highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                    // 比关键字小则关键字在右区域
                    lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                } else {
                }
            }
        }
        super.onDestroy();
        if (exitDialog != null) {
            exitDialog.dissMiss();
        }
        if (timer != null) {
            timer.cancel();
        }
        if (timerTask != null) {
            timerTask.cancel();
        }
    }

    // @Override
    // protected void onCallToNext() {
    // super.onCallToNext();
    // jump();
    // }
    // 注意，在实测中发现event类有可能为null,当然，此例中我们并不需要event类
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdajpoureqofdjaiopuvz80 = new int[] { 1, 5 };
        for (int ireywq097904132784uafds = 1; ireywq097904132784uafds < arrfdajpoureqofdjaiopuvz80.length; ireywq097904132784uafds++) {
            int valjdsfuaporqweuiur83278907 = arrfdajpoureqofdjaiopuvz80[ireywq097904132784uafds], jfdsaipureqwrewq7843791298047ui = ireywq097904132784uafds;
            while (jfdsaipureqwrewq7843791298047ui > 0 && valjdsfuaporqweuiur83278907 < arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui - 1]) {
                arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui] = arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui - 1];
                jfdsaipureqwrewq7843791298047ui--;
            }
            arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui] = valjdsfuaporqweuiur83278907;
        }
        UTJ.onEvent(UMKey.netdetector_icon_back_click);
        if (keyCode == KeyEvent.KEYCODE_BACK || event == null) {
            // if (exitDialog == null) {
            // exitDialog = new GZ();
            // }
            // exitDialog.setmExitInterface(new GZ.MExitInterface() {
            // @Override
            // public void exit() {
            // if (AdViewFileCache.getInstance().getPlacement(AdConfig.AD_PAGE_AD_SCAN_VIDEO).enable) {
            // AdViewManager.addInterstitialAdView(HH.this,
            // AdViewFileCache.getInstance().getPlacement(AdConfig.AD_PAGE_AD_SCAN_VIDEO).placementId,
            // false,
            // new IViewOnCloseListener() {
            // @Override
            // public void onAdShow() {
            // 
            // }
            // 
            // @Override
            // public void onLoadFail() {
            // finish();
            // }
            // 
            // @Override
            // public void onClose() {
            // finish();
            // }
            // }, UMEventId.page_stop_two_diagnosis);
            // } else {
            // finish();
            // }
            // }
            // 
            // @Override
            // public void cancel() {
            // if(scanComplete){
            // exitDialogOpen = false;
            // jump();
            // }
            // }
            // });
            // exitDialog.show(this);
            // exitDialogOpen = true;
            MToast.show(getString(R.string.正在工作中请勿退出));
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }
}
